using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class OERPConfMap : EntityTypeConfiguration<OERPConf>
    {
        public OERPConfMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.DESC)
                .HasMaxLength(30);

            this.Property(t => t.TOTAL)
                .HasMaxLength(8);

            this.Property(t => t.ORIENT)
                .HasMaxLength(10);

            this.Property(t => t.CURRENCY)
                .HasMaxLength(15);

            this.Property(t => t.KLRAN)
                .HasMaxLength(5);

            this.Property(t => t.File_Primary_Key)
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("OERPConf");
            this.Property(t => t.DESC).HasColumnName("DESC");
            this.Property(t => t.ITEM).HasColumnName("ITEM");
            this.Property(t => t.DESCRIP).HasColumnName("DESCRIP");
            this.Property(t => t.DATE).HasColumnName("DATE");
            this.Property(t => t.QUANTITY).HasColumnName("QUANTITY");
            this.Property(t => t.PRICE).HasColumnName("PRICE");
            this.Property(t => t.TOTAL).HasColumnName("TOTAL");
            this.Property(t => t.PATDUE).HasColumnName("PATDUE");
            this.Property(t => t.GUAR1DUE).HasColumnName("GUAR1DUE");
            this.Property(t => t.GUAR2DUE).HasColumnName("GUAR2DUE");
            this.Property(t => t.TOTPAT).HasColumnName("TOTPAT");
            this.Property(t => t.TOTGUAR1).HasColumnName("TOTGUAR1");
            this.Property(t => t.TOTGUAR2).HasColumnName("TOTGUAR2");
            this.Property(t => t.STAFFDET).HasColumnName("STAFFDET");
            this.Property(t => t.TOTSTAFF).HasColumnName("TOTSTAFF");
            this.Property(t => t.SUPPPAT).HasColumnName("SUPPPAT");
            this.Property(t => t.SUPPGUAR1).HasColumnName("SUPPGUAR1");
            this.Property(t => t.SUPPGUAR2).HasColumnName("SUPPGUAR2");
            this.Property(t => t.ORIENT).HasColumnName("ORIENT");
            this.Property(t => t.WIDTH).HasColumnName("WIDTH");
            this.Property(t => t.CURRENCY).HasColumnName("CURRENCY");
            this.Property(t => t.DISCOUNT).HasColumnName("DISCOUNT");
            this.Property(t => t.SUBTOTAL).HasColumnName("SUBTOTAL");
            this.Property(t => t.PATDUEBDIS).HasColumnName("PATDUEBDIS");
            this.Property(t => t.INVTOTAL).HasColumnName("INVTOTAL");
            this.Property(t => t.HOSPSHARE).HasColumnName("HOSPSHARE");
            this.Property(t => t.PRICE_G1).HasColumnName("PRICE_G1");
            this.Property(t => t.PRICE_G2).HasColumnName("PRICE_G2");
            this.Property(t => t.SPACETYPE).HasColumnName("SPACETYPE");
            this.Property(t => t.PRICEOP).HasColumnName("PRICEOP");
            this.Property(t => t.TOTOP).HasColumnName("TOTOP");
            this.Property(t => t.ITMCOMMENT).HasColumnName("ITMCOMMENT");
            this.Property(t => t.SPACE_NO).HasColumnName("SPACE_NO");
            this.Property(t => t.TOTG1ATEND).HasColumnName("TOTG1ATEND");
            this.Property(t => t.K_L_R).HasColumnName("K_L_R");
            this.Property(t => t.SHOW100G1).HasColumnName("SHOW100G1");
            this.Property(t => t.SHOWTDUEG1).HasColumnName("SHOWTDUEG1");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.KLRAN).HasColumnName("KLRAN");
            this.Property(t => t.SIGNATURE).HasColumnName("SIGNATURE");
            this.Property(t => t.COMPANYHEAD).HasColumnName("COMPANYHEAD");
            this.Property(t => t.File_Primary_Key).HasColumnName("File Primary Key");
            this.Property(t => t.TOTKAREOR).HasColumnName("TOTKAREOR");
        }
    }
}
